import { request } from '@/utils/request.js'

export default {
  /**
   * 获取管理员清单
   * @returns
   */
  getUser(params = {}) {
    return request({
      url: '/p5wznrna/admin/list',
      method: 'post',
      data:params 
    })
  },
  /**
   * 获取管理员公共枚舉
  */
  getUserParams(params) {
    return request({
      url: '/p5wznrna/admin/list',
      method: 'get',
      params:params
    })
  },
  /**
   * 新增管理员
  */
  createUser(params = {}){
    return request({
      url: '/p5wznrna/admin/create',
      method: 'post',
      data:params 
    })
  },
  /**
   * 编辑管理员
  */
  updateUser(params){
    return request({
      url: '/p5wznrna/admin/update',
      method: 'post',
      data:params 
    })
  },
  /**
   * 刪除管理员
  */
  deleteUser(params){
    return request({
      url: '/p5wznrna/admin/delete',
      method: 'post',
      data:params 
    })
  },

   /**
   * 操作日志
  */
   getOpLog(params){
    return request({
      url: '/p5wznrna/admin_log',
      method: 'post',
      data:params 
    })
  },
  /**
   * 修改個人资料
  */
  updateMyInfo(params){
    return request({
      url: '/p5wznrna/admin_info',
      method: 'post',
      data:params 
    })
  },

   /**
   * 所有人的操作日志
  */
   getAllOpLog(params){
    return request({
      url: '/p5wznrna/admin/admin_log',
      method: 'post',
      data:params 
    })
  },

  /**
   * 查看单人记录
  */
  getSingleLog(params){
    return request({
      url: '/p5wznrna/adminLog/list',
      method: 'post',
      data:params 
    })
  },
  /**
   * 角色组清单
  */
  getRoleList(params){
    return request({
      url: '/p5wznrna/role/list',
      method: 'post',
      data:params 
    })
  },
  /**
   * 获取角色樹
  */
  getRoleTree(params){
    return request({
      url: '/p5wznrna/role/tree',
      method: 'post',
      data:params 
    })
  },
   /**
   * 创建角色
  */
   createRole(params){
    return request({
      url: '/p5wznrna/role/create',
      method: 'post',
      data:params 
    })
  },
  /**
   * 创建角色
  */
  updateRole(params){
    return request({
      url: '/p5wznrna/role/update',
      method: 'post',
      data:params 
    })
  },
  /**
   * 删除角色
  */
  deleteRole(params){
    return request({
      url: '/p5wznrna/role/delete',
      method: 'post',
      data:params 
    })
  },
  getMenus(params = {}) {
    return request({
      url: '/p5wznrna/index',
      method: 'get',
      headers:{'content-type':'application/json; charset=UTF-8'},
      params
    })
  },
   /**
   *实用功能-多语言-列表
   * @returns
   */
   languageList(params) {
    return request({
      url: '/p5wznrna/lang/list',
      method: 'post',
      data:params 
    })
  },
  
  /**
   *实用功能-多语言-添加参数
   * @returns
   */
   addLanguageParams(params) {
    return request({
      url: '/p5wznrna/lang/addFile',
      method: 'get',
      data:params 
    })
  },
   /**
   *实用功能-多语言-添加
   * @returns
   */
   addLanguage(params) {
    return request({
      url: '/p5wznrna/lang/addFile',
      method: 'post',
      data:params
    })
  },
  /**
   *实用功能-多语言-编辑列表
   * @returns
   */
   updateLanguageList(params) {
    return request({
      url: '/p5wznrna/lang/updateFile',
      method: 'post',
      data:params 
    })
  },
  /**
   *实用功能-多语言-编辑提交
   * @returns
   */
   updateLanguage(params) {
    return request({
      url: '/p5wznrna/lang/update',
      method: 'post',
      headers:{
        'Content-type':'application/x-www-form-urlencoded;charset=utf-8',
      },
      data:params 
    })
  },
  /**
   *实用功能-多语言-数据库导入
   * @returns
   */
   sqlLanguage(params) {
    return request({
      url: '/p5wznrna/lang/sqlGenerateFile',
      method: 'post',
      data:params 
    })
  },
  system_config_list(params) {
    return request({
      url: '/user/admin/project_config/list',
      method: 'post',
      data:params 
    })
  },
  system_config_update(params) {
    return request({
      url: '/user/admin/project_config/update',
      method: 'post',
      data:params 
    })
  },
  cangku_input_list(params) {
    return request({
      url: '/shop/admin/stockroom/skuLogAddList',
      method: 'post',
      data:params 
    })
  },
  cangku_input_flow(id) {
    return request({
      url: `/shop/admin/stockroom/SkuRukuLog?id=${id}`,
      method: 'get',
    })
  },
  cangku_input_add(params) {
    return request({
      url: '/shop/admin/stockroom/skuLogAdd',
      method: 'post',
      data: params,
      requestType: "special",
      indices:true
    })
  },
  cangku_input_add_no_sync(params) {
    return request({
      url: '/shop/admin/stockroom/addGoodsSkuLog',
      method: 'post',
      data: params,
      requestType: "special",
      indices:true
    })
  },
  cangku_input_add_config(params) {
    return request({
      url: '/shop/admin/stockroom/skuLogAdd',
      method: 'get',
      params:params 
    })
  },
  cangku_input_add_search(params) {
    return request({
      url: '/shop/admin/stockroom/searchSku',
      method: 'post',
      data:params 
    })
  },
  
  
  
  
  
  
}
